<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head th:include="common/common :: jscss">
    <title>关联产品分类</title>
</head>
<body>

<div class="layui-fluid">

    <blockquote class="layui-crumb">
        前台产品>产品管理>
        <a lay-href="/showProduct/list.action">前台产品管理</a>>
        <a th:href="'/showProduct/addEditView.action?productId='+${servProductVO.productId}">[[${servProductVO.name}]]</a>>
        <zmn>关联后台产品</zmn>
    </blockquote>

    <div class="layui-card">
        <div class="layui-card-body">
            <form method="post" action="" class="layui-form" lay-filter="zmn-categ-form">

                <div class="layui-card-header" style="margin-top:10px;"><b>选择后台产品，提交后将与后台产品关联，原关联自动清理更新。</b></div>
                <div class="layui-split">&nbsp;</div>

                <div class="layui-form-item"  th:each="m : ${categTwos}">
                    <zmn th:if="${map[m.categId]!=null}">
                        <label class="layui-form-label">[[${m.name}+'：']]</label>
                        <div class="layui-input-block">
                            <tr  th:each="p : ${map[m.categId]}">
                                <input type="checkbox" name="showPlat" th:value="${p.productId}" th:title="${p.name}" th:checked="${selected.indexOf(p.productId)!=-1}">
                            </tr>
                        </div>
                    </zmn>

                </div>

                <!--按钮栏
                        置于form标签内的最下方，
                        主功能按钮使用默认样式，次要功能按钮使用原始按钮(加入样式layui-btn-primary)
                        -->
                <div class="layui-form-item submit">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit="" lay-filter="zmn-form-submit">提交</button>
                        <button class="layui-btn layui-btn-primary" id="cancel">取消</button>
                    </div>
                </div>

                <div class="layui-split">&nbsp;</div>
            </form>
        </div>

    </div>

</div>

<script type="text/javascript" th:inline="javascript">
    var json = {
        showProductId: [[${servProductVO.productId}]]
    };
    layui.config({
        base: "/static/lay/",
        version:2019092600007
    }).extend({
        index: "lib/index",
        art_product_relation_edit: "product/show/relation/zmn.art.product.relation.edit",
    }).use(['index', 'art_product_relation_edit']);

</script>
</body>
</html>